<!doctype html>
<html>

  <head>
    <meta charset='utf-8'>
      <!-- Always force latest IE rendering engine or request Chrome Frame -->
      <meta content='IE=edge,chrome=1' http-equiv='X-UA-Compatible'>
        <!-- Use title if it's in the page YAML frontmatter -->
        <title></title>
        <link href="stylesheets/all.css" media="screen" rel="stylesheet" type="text/css" />
        <script src="javascripts/all.js" type="text/javascript"></script>
        <script src="js/jquery-1.7.2.min.js"></script>
        <script src="js/lightbox.js"></script>
        <link href="css/lightbox.css" rel="stylesheet" />
        
      </meta></meta>
  </head>
  <body class="gal">

    <?php
    // Datos de conexión a configurar
    $user = "matthu";
    $pass = "12345";
    $bbdd = "imagenes";
 
    // Conecto a la BBDD
    $dbh = mysql_connect("localhost", $user, $pass);
    $db = mysql_select_db($bbdd);

    $nombre = mysql_query('SELECT nombre_archivo FROM tablaimagenes'); 
    $desc =  mysql_query('SELECT descri FROM tablaimagenes');?>
    <div class='galeria'>

    <?php while ( ($row = mysql_fetch_array($nombre)) && ($row2 = mysql_fetch_array($desc)) ) { ?>
      <a href="uploads/<?php echo $row['nombre_archivo'] ?>" rel="lightbox[gal1]" title="<?php echo $row2['descri'] ?>"> <img class="image small" src="uploads/<?php echo $row['nombre_archivo'] ?>" /> </a>
    <?php } ?> 
    
    <div ><a class="link gal" href="aplicaciones.php">Volver a Aplicaciones</a></div>  
    </div>

  </body>
</html>
